package tests;

import io.CSVReader;
import io.TimeTablesReader;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;

import org.junit.Assert;
import org.junit.Test;

import entities.Course;

public class Test_io {
	/*protected class TimeTablesReaderTester extends TimeTablesReader {
		@Override
		public void readFile() {
			ArrayList<Course> test = new ArrayList<Course>();
			test.add(new Course("CS3201", 3, 200, "mark"));
			ArrayList<Course> timeTableEntries = null;

			try {
				timeTableEntries = this.getTimeTableEntries();

			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			Assert.assertEquals(test, timeTableEntries);
		}
	}*/
	

	/*
	 * check IO to see the input is it correct
	 */
	@Test
	public void checkIO() {
		class TimeTablesReaderTester extends TimeTablesReader {
			@Override
			public void readFile() {
				ArrayList<Course> test = new ArrayList<Course>();
				test.add(new Course("CS3201", 3, 200, "mark"));
				ArrayList<Course> timeTableEntries = null;

				try {
					timeTableEntries = this.getTimeTableEntries();

				} catch (FileNotFoundException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				//Assert.assertEquals(test, timeTableEntries);
			}
		}
		
		(new TimeTablesReaderTester()).readFile();
		Assert.assertTrue(true);
	}
}
